Multi-system terminal system updating method, updating device and terminal

ABSTRACT

A system updating method for a multi-system terminal, a system updating device for a multi-system device, and a terminal include: during a process of creating a system updating file of the multi-system terminal, detecting whether data of a plurality of file partitions specified in the system updating file has changed; upon detecting that the data of at least one file partition of the plurality of file partitions has changed, establishing an identification file for updating a system corresponding to the at least one file partition in the system updating file; and upon receiving an instruction for updating a system of the multi-system terminal, updating a corresponding system of the multi-system terminal according to the identification file of the system updating file.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a continuation in part of International PatentApplication PCT No. PCT/CN2014/091812, filed on Nov. 20, 2014, entitled“MULTI-SYSTEM TERMINAL SYSTEM UPDATING METHOD, UPDATING DEVICE ANDTERMINAL”, which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to the technical field of terminalsystem, and in particular, to a system updating method for amulti-system terminal, a system updating device for a multi-systemterminal, and a terminal.

BACKGROUND

With the development of smart terminal technology, the pertinent artprovides terminals having multiple systems. For example, for a terminalhaving two systems, one system is used as a safe system, and the othersystem is used as a normal system.

Presently, many manners of running dual systems of a terminal exist. Forexample, each time just one system is run, and when switching thesystems, the terminal needs to be restarted. Or the two systems are runsimultaneously, and a certain manner can be used for switching the twosystems without restarting the terminal. During a process of using thedual-system terminal, a problem of updating systems of the multi-systemterminal inevitably occurs. However, in the pertinent art, a feasiblesystem updating solution for the multi-system terminal is not proposed.

Therefore, how to update systems of the multi-system terminal has becomea technical problem which needs to be solved instantly.

SUMMARY

Based on at least one of the above technical problems, the presentdisclosure provides a new system updating solution for a multi-systemterminal. By means of the present disclosure, any system of themulti-system terminal can be simply updated, a high applicability can beobtained, and the operation and control is easy, thereby improvingefficiency of system updating.

In view of this, in the present disclosure, a system updating method fora multi-system terminal is provided. The method comprises: during aprocess of creating a system updating file of the multi-system terminal,detecting whether data of a plurality of file partitions specified inthe system updating file has changed; upon detecting that the data of atleast one file partition of the plurality of file partitions haschanged, establishing an identification file for updating a systemcorresponding to the at least one file partition in the system updatingfile; and upon receiving an instruction for updating a system of themulti-system terminal, updating a corresponding system of themulti-system terminal according to the identification file of the systemupdating file.

In the technical solution, when updating a system of the terminal, whatis needed to do is to add a patch file to a corresponding file partitionof the system updating file. Therefore, during the process of creatingthe system updating file, when it is detected that the data of themultiple file partitions specified in the system updating file haschanged, the multi-system terminal establishes an identifier file forupdating a corresponding system, thus the system to be updated can bedetermined during the process of creating the patch file. Accordingly,when the multi-system terminal performs an operation of system updating,a corresponding system of the multi-system terminal can be updated justaccording to the identifier file of the system updating file, and a userdoes not need to participate in the system updating process to informthe terminal of the system to be updated, accordingly, any system of themulti-system terminal can be easily updated, a high applicability can beobtained, the operation and control is easy, thereby improvingefficiency of system updating.

In the above technical solution, preferably, the plurality of filepartitions comprises a partition of a boot program for booting theloading of a kernel of the multi-system terminal. Detecting whether thedata of the plurality of file partitions specified in the systemupdating file has changed, and establishing the identifier filecomprises: detecting whether the data of the partition of the bootprogram for booting the loading of the kernel of the multi-systemterminal has changed; and establishing the identifier file for updatingall systems of the multi-system terminal upon detecting that the data ofthe partition of the boot program for booting the loading of the kernelof the multi-system terminal has changed.

In the technical solution, the partition of the boot program for bootingthe loading of the kernel of the terminal is a partition which needs tobe firstly loaded when the terminal is started. If the data of thepartition has changed, it indicates that a system loading strategy ofthe terminal has changed, thus each of the systems of the terminal needsto be updated. For example, for an embedded system, e.g., the Androidsystem, the boot program for booting the loading of the kernel of theterminal is bootloader, the partition of the boot program is an abootpartition. When it is detected that the data of the aboot partition ofthe system updating file has changed, it is determined that all of thesystems of the terminal need to be updated.

In the above technical solution, preferably, the plurality of filepartitions further comprise partitions of boot programs each for bootingthe starting of one of the systems of the multi-system terminal, andsystem partitions each corresponding to one of the systems. Detectingwhether the data of the plurality of file partitions specified in thesystem updating file has changed, and establishing the identifier filecomprises: detecting whether the data of the file partitions of the bootprograms each for booting the starting of one of the systems of themulti-system terminal has changed, and detecting whether the data of thesystem partitions each corresponding to one of the systems has changed;and upon detecting that the data of the partition of the boot programfor booting the loading of the kernel of the multi-system terminal isunchanged, and detecting that the data of the partition of the bootprogram for booting the starting of one of the systems of themulti-system terminal has changed, and/or upon detecting that the dataof the system partition corresponding to the one of the systems haschanged, establishing an identifier file for updating the one of thesystems.

In the technical solution, the partition of the boot program for bootingthe starting of one of the systems and the system partitioncorresponding to the one of the systems correspond to the one of thesystems of the terminal. Therefore, upon detecting that the data of thepartition of the boot program for booting the one of the systems haschanged, and/or upon detecting that the data of the system partitioncorresponding to the one of the systems has changed, it is determinedthat the one of the systems needs to be updated. For example, in theAndroid system, the partition of the boot program for booting thestarting of one of the systems is the boot partition, and the systempartition corresponding to one of the systems is the system partition.Upon detecting that in the system updating file the data of the bootpartition corresponding to a certain system has changed, and/or upondetecting that in the system updating file the data of the systempartition corresponding to the certain system has changed, it isdetermined that the certain system needs to be updated.

In the above technical solution, preferably, upon receiving theinstruction for updating a system of the multi-system terminal, themethod further comprises: parsing the system updating file to obtain theidentifier file of the system updating file.

In the technical solution, after creating the system updating file, thesystem updating file is compressed. Thus, when determining whether thesystem updating file includes the identifier file for updating a systemof the terminal, the system updating file needs to be parsed.

In the above technical solution, preferably, whether the data of each ofthe plurality of file partitions has changed is determined by detectingwhether each of the plurality of file partitions comprises a file havinga specified suffix.

Specifically, in the Android system, if the data of a certain partitionof the system updating file has changed, a corresponding “*.P” patchfile is created in the certain partition, thus whether the data of thefile partition has changed can be determined by detecting whether thefile partition includes a file having the specified suffix.

In the above technical solution, preferably, updating one of the systemsof the multi-system terminal comprises: verifying in the system updatingfile files of the system partition of the one of the systems, andverifying in the system updating file the data of the partition of theboot program for booting the starting of the one of the systems; andafter the verification, writing the files of the system partition of theone of the systems in the system updating file and the data of thepartition of the boot program for booting the starting of the one of thesystems in the system updating file into corresponding file partitionsof the multi-system terminal respectively.

The system starting solution of the multi-system terminal of the presentdisclosure includes following.

According to an implementation of the present disclosure, upon receivingan instruction for starting all of the systems of the multi-systemterminal, the partitions of the boot programs each for booting thestarting of one of the systems of the multi-system terminal are loadedvia the boot program for booting the loading of the kernel of themulti-system terminal. Scripts of init processes each corresponding toone of the systems are parsed via the init processes started by thekernel of the multi-system terminal, so as to create file systems eachcorresponding to one of the systems, and start system processes eachcorresponding to one of the systems, thereby realizing loading of thesystem partitions each corresponding to one of the systems.

Specifically, for a dual-system terminal, one system is defined as anunsafe system, and another system is defined as a safe system. After theterminal is powered on, the boot_unsafe partition and the boot_safepartition are simultaneously loaded by the bootloader of the terminal,and the init processes are started to respectively parse the scripts ofthe init_unsafe and init_safe, so as to create the file systems eachcorresponding to one of the systems, start the system processes, and soon. Therefore, the system_unsafe partition and the system_safe partitioncan be loaded to finish the starting of the dual-system terminal.

According to another aspect of the present disclosure, a system updatingdevice for a multi-system terminal is further provided. The devicecomprises: a detecting unit configured to detect whether data of aplurality of file partitions specified in a system updating file haschanged during a process of creating the system updating file of themulti-system terminal, an establishing unit configured to establish anidentification file for updating a system corresponding to at least onefile partition of the plurality of file partitions in the systemupdating file when the detecting unit detects that the data of the atleast one file partition has changed, and a system updating unitconfigured to update a corresponding system of the multi-system terminalaccording to the identification file of the system updating file uponreceiving an instruction for updating a system of the multi-systemterminal.

In the technical solution, when updating a system of the terminal, whatis needed to do is to add a patch file to a corresponding file partitionof the system updating file. Therefore, during the process of creatingthe system updating file, when it is detected that the data of themultiple file partitions specified in the system updating file haschanged, the establishing unit establishes an identifier file forupdating a corresponding system, thus the system to be updated can bedetermined during the process of creating the patch file. Accordingly,when the system updating unit performs an operation of system updating,a corresponding system of the multi-system terminal can be updated justaccording to the identifier file of the system updating file, and a userdoes not need to participate in the system updating process to informthe terminal of the system to be updated, accordingly, any system of themulti-system terminal can be easily updated, a high applicability can beobtained, the operation and control is easy, thereby improvingefficiency of system updating.

In the above technical solution, preferably, the plurality of filepartitions comprises a partition of a boot program for booting theloading of a kernel of the multi-system terminal. The detecting unit isconfigured to detect whether the data of the partition of the bootprogram for booting the loading of the kernel of the multi-systemterminal has changed. The establishing unit is configured to establishthe identifier file for updating all systems of the multi-systemterminal when the detecting unit detects that the data of the partitionof the boot program for booting the loading of the kernel of themulti-system terminal has changed.

In the technical solution, the partition of the boot program for bootingthe loading of the kernel of the terminal is a partition which needs tobe firstly loaded when the terminal is started. When the data of thepartition has changed, it indicates that a system loading strategy ofthe terminal has changed, thus each of the systems of the terminal needsto be updated. For example, for an embedded system, e.g., the Androidsystem, the boot program for booting the loading of the kernel of theterminal is bootloader, the partition of the boot program is an abootpartition. When it is detected that the data of the aboot partition ofthe system updating file has changed, it is determined that all of thesystems of the terminal need to be updated.

In the above technical solution, preferably, the plurality of filepartitions further comprise partitions of boot programs each for bootingthe starting of one of the systems of the multi-system terminal, andsystem partitions each corresponding to one of the systems. Thedetecting unit is further configured to detect whether the data of thepartitions of the boot programs each for booting the starting of one ofthe systems of the multi-system terminal has changed, and detect whetherthe data of the system partitions each corresponding to one of thesystems has changed. The establishing unit is further configured toestablish an identifier file for updating one of the systems when thedetecting unit detects that the data of the partition of the bootprogram for booting the loading of the kernel of the multi-systemterminal is unchanged, and detects that the data of the partition of theboot program for booting the starting of the one of the systems of themulti-system terminal has changed, and/or detects that the data of thesystem partition corresponding to the one of the systems has changed.

In the technical solution, the partition of the boot program for bootingthe starting of one of the systems and the system partitioncorresponding to the one of the systems correspond to the one of thesystems of the terminal. Therefore, upon detecting that the data of thepartition of the boot program for booting one of the systems haschanged, and/or upon detecting that the data of the system partitioncorresponding to the one of the systems has changed, it is determinedthat the one of the systems needs to be updated. For example, in theAndroid system, the partition of the boot program for booting thestarting of one of the systems is the boot partition, and the systempartition corresponding to one of the systems is the system partition.Upon detecting that in the system updating file the data of the bootpartition corresponding to a certain system has changed, and/or upondetecting that in the system updating file the data of the systempartition corresponding to the certain system has changed, it isdetermined that the certain system needs to be updated.

In the above technical solution, preferably, the device furthercomprises a first parsing unit configured to parse the system updatingfile to obtain the identifier file of the system updating file.

In the technical solution, after creating the system updating file, thesystem updating file is compressed. Thus, when determining whether thesystem updating file includes the identifier file for updating a systemof the terminal, the system updating file needs to be parsed.

In the above technical solution, preferably, the detecting unit isconfigured to detect whether the data of each of the plurality of filepartitions has changed by detecting whether each of the plurality offile partitions comprises a file having a specified suffix.

Specifically, in the Android system, if the data of a certain partitionof the system updating file has changed, a corresponding “*.P” patchfile is created in the certain partition, thus whether the data of thefile partition has changed can be determined by detecting whether thefile partition includes a file having the specified suffix.

In the above technical solution, preferably, the system updating unitcomprises: a verifying unit configured to verify in the system updatingfile files of the system partition of the one of the systems, andverifying in the system updating file the data of the partition of theboot program for booting the starting of the one of the systems; and awriting unit configured to write the files of the system partition ofthe one of the systems in the system updating file and the data of thepartition of the boot program for booting the starting of the one of thesystems in the system updating file into corresponding file partitionsof the multi-system terminal respectively after the verifying unitfinishes the verification.

The system starting solution of the multi-system of the presentdisclosure includes following.

According to an implementation of the present disclosure, the systemupdating device for a multi-system terminal further includes: a loadingunit configured to load the partitions of the boot programs each forbooting the starting of one of the systems of the multi-system terminalvia the boot program for booting the loading of the kernel of themulti-system terminal upon receiving an instruction for starting all ofthe systems of the multi-system terminal, and a second parsing unitconfigured to parse scripts of init processes each corresponding to oneof the systems via the init processes started by the kernel of themulti-system terminal, so as to create file systems each correspondingto one of the systems, and start system processes each corresponding toone of the systems, thereby realizing loading of the system partitionseach corresponding to one of the systems.

Specifically, for a dual-system terminal, one system is defined as anunsafe system, and another system is defined as a safe system. After theterminal is powered on, the boot_unsafe partition and the boot_safepartition are simultaneously loaded by the bootloader of the terminal,and the init processes are started to respectively parse the scripts ofthe init_unsafe and init_safe, so as to create the file systems eachcorresponding to one of the systems, start the system processes, and soon. Therefore, the system_unsafe partition and the system_safe partitioncan be loaded to finish the starting of the dual-system terminal.

According to yet another aspect of the present disclosure, a terminal isprovided. The terminal includes a plurality of systems, and a systemupdating device for a multi-system terminal described in any of theabove technical solutions.

By means of the above technical solution, any system of the multi-systemterminal can be updated easily, a high applicability can be obtained,the operation and control is easy, thereby improving efficiency ofsystem updating.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic flow chart of a system updating method for amulti-system terminal in accordance with an implementation of thepresent disclosure.

FIG. 2 is a schematic function block diagram of a system updating devicefor a multi-system terminal in accordance with an implementation of thepresent disclosure.

FIG. 3 is a schematic view of a file partition structure of a terminalin accordance with an implementation of the present disclosure.

FIG. 4 is a schematic flow chart of a system updating method of adual-system terminal in accordance with an implementation of the presentdisclosure.

FIG. 5 is a schematic flow chart of an updating method of a normalsystem in accordance with an implementation of the present disclosure.

FIG. 6 is a schematic flow chart of an updating method of a safe systemin accordance with an implementation of the present disclosure.

FIG. 7 is a schematic flow chart of a method for updating a normalsystem and a safe system simultaneously in accordance with animplementation of the present disclosure.

FIG. 8 is a diagrammatic view of a multi-system terminal in accordancewith an implementation of the present disclosure.

DETAILED DESCRIPTION

To understand the above-mentioned purposes, features and advantages ofthe present disclosure more clearly, the present disclosure will befurther described in detail below in combination with the accompanyingdrawings and the specific implementations. It should be noted that, theimplementations of the present application and the features in theimplementations may be combined with one another without conflicts.

Many specific details will be described below for sufficientlyunderstanding the present disclosure. However, the present disclosuremay also be implemented by adopting other manners different from thosedescribed herein. Accordingly, the protection scope of the presentdisclosure is not limited by the specific implementations disclosedbelow.

FIG. 1 is a schematic flow chart of a system updating method for amulti-system terminal in accordance with an implementation of thepresent disclosure.

As illustrated by FIG. 1, a system updating method for a multi-systemterminal in accordance with an implementation of the present disclosureincludes: step 102, during a process of creating a system updating fileof the multi-system terminal, detecting whether data of multiple filepartitions specified in the system updating file has changed; step 104,upon detecting that the data of at least one file partition of themultiple file partitions has changed, establishing an identificationfile for updating a system corresponding to the at least one filepartition in the system updating file; step 106, upon receiving aninstruction for updating a system of the multi-system terminal, updatinga corresponding system of the multi-system terminal according to theidentification file of the system updating file.

In the technical solution, when updating a system of the terminal, whatis needed to do is to add a patch file to a corresponding file partitionof the system updating file. Therefore, during the process of creatingthe system updating file, when it is detected that the data of themultiple file partitions specified in the system updating file haschanged, the multi-system terminal establishes an identifier file forupdating a corresponding system, thus the system to be updated can bedetermined during the process of creating the patch file. Accordingly,when the multi-system terminal performs an operation of system updating,a corresponding system of the multi-system terminal can be updated justaccording to the identifier file of the system updating file, and a userdoes not need to participate in the system updating process to informthe terminal of the system to be updated, accordingly, any system of themulti-system terminal can be easily updated, a high applicability can beobtained, the operation and control is easy, thereby improvingefficiency of system updating.

In the above technical solution, preferably, the multiple filepartitions include a partition of a boot program for booting the loadingof a kernel of the terminal. Detecting whether the data of the multiplefile partitions specified in the system updating file has changed, andcreating the identifier file specifically includes: detecting whetherthe data of the partition of the boot program for booting the loading ofthe kernel of the terminal has changed, and establishing an identifierfile for updating all of systems of the terminal upon detecting that thedata of the partition of the boot program for booting the loading of thekernel of the terminal has changed.

In the technical solution, the partition of the boot program for bootingthe loading of the kernel of the terminal is a partition which needs tobe firstly loaded when the terminal is started. If the data of thepartition has changed, it indicates that a system loading strategy ofthe terminal has changed, thus each of the systems of the terminal needsto be updated. For example, for an embedded system, e.g., the Androidsystem, the boot program for booting the loading of the kernel of theterminal is bootloader, the partition of the boot program is an abootpartition. When it is detected that the data of the aboot partition ofthe system updating file has changed, it is determined that all of thesystems of the terminal needs to be updated.

In the above technical solution, preferably, the multiple filepartitions further include partitions of boot programs each for bootingthe starting of one of the systems of the terminal, and systempartitions each corresponding to one of the systems. Detecting whetherthe data of the multiple file partitions specified in the systemupdating file has changed, and establishing the identifier filespecifically includes: detecting whether data of the partitions of theboot programs each for booting the starting of one of the systems of theterminal has changed, and detecting whether data of the systempartitions each corresponding to one of the systems has changed; upondetecting that the data of the partition of the boot program for bootingthe loading of the kernel of the terminal is not changed, and detectingthat the data of the partition of the boot program for booting thestarting of one of the systems of the terminal has changed, and/or upondetecting that the data of the system partition corresponding to the oneof the systems has changed, establishing an identifier file for updatingthe one of the system.

In the technical solution, the partition of the boot program for bootingthe starting of one of the systems and the system partitioncorresponding to the one of the systems correspond to the one of thesystems of the terminal. Therefore, upon detecting that the data of thepartition of the boot program for booting one of the systems haschanged, and/or upon detecting that the data of the system partitioncorresponding to the one of the systems has changed, it is determinedthat the one of the systems needs to be updated. For example, in theAndroid system, the partition of the boot program for booting thestarting of one of the systems is the boot partition, and the systempartition corresponding to one of the systems is the system partition.Upon detecting that in the system updating file the data of the bootpartition corresponding to a certain system has changed, and/or upondetecting that in the system updating file the data of the systempartition corresponding to the certain system has changed, it isdetermined that the certain system needs to be updated.

In the above technical solution, preferably, upon receiving theinstruction for updating a system of the multi-system terminal, themethod further includes parsing the system updating file to obtain theidentifier file of the system updating file.

In the technical solution, after creating the system updating file, thesystem updating file is compressed is compressed. Thus, when determiningwhether the system updating file includes the identifier file forupdating a system of the terminal, the system updating file needs to beparsed.

In the above technical solution, preferably, whether the data of eachfile partition has changed is determined by detecting whether each ofthe multiple file partitions includes a file having a specified suffix.

Specifically, in the Android system, if the data of a certain partitionof the system updating file has changed, a corresponding “*.P” patchfile is created in the certain partition, thus whether the data of thefile partition has changed can be determined by detecting whether thefile partition includes a file having the specified suffix.

In the above technical solution, preferably, the step of updating theone of the systems of the multi-system terminal includes: verifying inthe system updating file files of the system partition of the one of thesystems and verifying in the system updating file the data of thepartition of the boot program for booting the starting of the one of thesystems; after the verification, writing the files of the systempartition of the one of the systems in the system updating file and thedata of the partition of the boot program for booting the starting ofthe one of the systems in the system updating file into correspondingfile partitions of the terminal respectively.

The system starting solution of the multi-system terminal of the presentdisclosure includes following.

According to an implementation of the present disclosure, upon receivingthe instruction for starting all of the systems of the terminal, thepartitions of the boot programs each for booting the starting of one ofthe systems of the terminal are loaded via the boot program for bootingthe loading of the kernel of the terminal, and scripts of init processeseach corresponding to one of the systems are parsed via the initprocesses started by the kernel of the terminal, so as to create thefile systems each corresponding to one of the systems, and start thesystem processes each corresponding to one of the systems, therebyrealizing the loading of the system partitions each corresponding to oneof the systems.

Specifically, for a dual-system terminal, one system is defined as anunsafe system, and another system is defined as a safe system. After theterminal is powered on, the boot_unsafe partition and the boot_safepartition are simultaneously loaded by the bootloader of the terminal,and the init processes are started to respectively parse the scripts ofthe init_unsafe and init_safe, so as to create the file systems eachcorresponding to one of the systems, start the system processes, and soon. Therefore, the system_unsafe partition and the system_safe partitioncan be loaded to finish the starting of the dual-system terminal.

FIG. 2 is a schematic block diagram of a system updating device for amulti-system terminal in accordance with an implementation of thepresent disclosure.

As illustrated by FIG. 2, a system updating device 200 for amulti-system terminal in accordance with an implementation of thepresent disclosure includes a detecting unit 202 configured to detectwhether data of a plurality of file partitions specified in a systemupdating file has changed during a process of creating the systemupdating file of the multi-system terminal, an establishing unit 204configured to establish an identification file for updating a systemcorresponding to at least one file partition of the plurality of filepartitions in the system updating file upon detecting that the data ofthe at least one file partition has changed, and a system updating unit206 configured to update a corresponding system of the multi-systemterminal according to the identification file of the system updatingfile upon receiving an instruction for updating a system of themulti-system terminal.

In the technical solution, when updating a system of the terminal, whatis needed to do is to add a patch file to a corresponding file partitionof the system updating file. Therefore, during the process of creatingthe system updating file, when it is detected that the data of themultiple file partitions specified in the system updating file haschanged, the establishing unit 204 establishes an identifier file forupdating a corresponding system, thus the system to be updated can bedetermined during the process of creating the patch file. Accordingly,when the system updating unit 206 performs an operation of systemupdating, a corresponding system of the multi-system terminal can beupdated just according to the identifier file of the system updatingfile, and a user does not need to participate in the system updatingprocess to inform the terminal of the system to be updated, accordingly,any system of the multi-system terminal can be easily updated, a highapplicability can be obtained, the operation and control is easy,thereby improving efficiency of system updating.

In the above technical solution, preferably, the multiple filepartitions include a partition of a boot program for booting the loadingof a kernel of the terminal. The detecting unit 202 is configured todetect whether the data of the partition of the boot program for bootingthe loading of the kernel of the terminal has changed. The establishingunit 204 is configured to establish an identifier file for updating allof systems of the terminal when the detecting unit 202 detects that thedata of the partition of the boot program for booting the loading of thekernel of the terminal has changed.

In the technical solution, the partition of the boot program for bootingthe loading of the kernel of the terminal is a partition which needs tobe firstly loaded when the terminal is started. When the data of thepartition has changed, it indicates that a system loading strategy ofthe terminal has changed, thus each of the systems of the terminal needsto be updated. For example, for an embedded system, e.g., the Androidsystem, the boot program for booting the loading of the kernel of theterminal is bootloader, the partition of the boot program is an abootpartition. When it is detected that the data of the aboot partition ofthe system updating file has changed, it is determined that all of thesystems of the terminal need to be updated.

In the above technical solution, preferably, the multiple filepartitions further include partitions of boot programs each for bootingthe starting of one of the systems of the terminal, and systempartitions each corresponding to one of the systems. The detecting unit202 is further configured to detect whether data of the partitions ofthe boot programs each for booting the starting of one of the systems ofthe terminal has changed, and detect whether data of the systempartitions each corresponding to one of the systems has changed. Theestablishing unit 204 is further configured to establish an identifierfile for updating one of the systems when the detecting unit 202 detectsthat the data of the partition of the boot program for booting theloading of the kernel of the terminal is not changed, and detects thatthe data of the partition of the boot program for booting the startingof the one of the systems of the terminal has changed, and/or detectsthat the data of the system partition corresponding to the one ofsystems has changed.

In the technical solution, the partition of the boot program for bootingthe starting of one of the systems and the system partitioncorresponding to the one of the systems correspond to the one of thesystems of the terminal. Therefore, upon detecting that the data of thepartition of the boot program for booting one of the systems haschanged, and/or upon detecting that the data of the system partitioncorresponding to the one of the systems has changed, it is determinedthat the one of the systems needs to be updated. For example, in theAndroid system, the partition of the boot program for booting thestarting of one of the systems is the boot partition, and the systempartition corresponding to one of the systems is the system partition.Upon detecting that in the system updating file the data of the bootpartition corresponding to a certain system has changed, and/or upondetecting that in the system updating file the data of the systempartition corresponding to the certain system has changed, it isdetermined that the certain system needs to be updated.

In the above technical solution, preferably, the system updating device200 further includes a first parsing unit 208 configured to parse thesystem updating file to obtain the identifier file of the systemupdating file.

In the technical solution, after creating the system updating file, thesystem updating file is compressed. Thus, when determining whether thesystem updating file includes the identifier file for updating a systemof the terminal, the system updating file needs to be parsed.

In the above technical solution, preferably, the detecting unit 202 isconfigured to determine whether the data of each file partition haschanged by detecting whether each of the multiple file partitionsincludes a file having a specified suffix.

Specifically, in the Android system, when the data of a certainpartition of the system updating file has changed, a corresponding “*.P”patch file is created in the certain partition, thus whether the data ofthe file partition has changed can be determined by detecting whetherthe file partition includes a file having the specified suffix.

In the above technical solution, preferably, the system updating unit206 includes: a verifying unit 2062 configured to verify in the systemupdating file files of the system partition of the one of the systemsand verify in the system updating file the data of the partition of theboot program for booting the starting of the one of the systems, and awriting unit 2064 configured to write the files of the system partitionof the one of the systems in the system updating file and the data ofthe partition of the boot program for booting the starting of the one ofthe systems in the system updating file into corresponding filepartitions of the terminal respectively after the verifying unit 2062finishes the verification.

The system starting solution of the multi-system terminal of the presentdisclosure includes following.

According to an implementation of the present disclosure, the systemupdating device 200 for a multi-system terminal further includes aloading unit 210 configured to load the partitions of the boot programseach for booting the starting of one of the systems of the terminal viathe boot program for booting the loading of the kernel of the terminalupon receiving an instruction for starting all of the systems of theterminal, and a second parsing unit 212 configured to parse scripts ofinit processes each corresponding to one of the systems via the initprocesses started by the kernel of the terminal, so as to create thefile systems each corresponding to one of the systems, and start thesystem processes each corresponding to one of the systems, therebyrealizing the loading of the system partitions each corresponding to oneof the systems.

Specifically, for a dual-system terminal, one system is defined as anunsafe system, and another system is defined as a safe system. After theterminal is powered on, the boot_unsafe partition and the boot_safepartition are simultaneously loaded by the bootloader of the terminal,and the init processes are started to respectively parse the scripts ofthe init_unsafe and init_safe, so as to create the file systems eachcorresponding to one of the systems, start the system processes, and soon. Therefore, the system_unsafe partition and the system_safe partitioncan be loaded to finish the starting of the dual-system terminal.

The present disclosure further provides a terminal which includesmultiple systems and the system updating device 200 for the multi-systemterminal illustrated by FIG. 2.

Take the dual-system terminal for an example, the followingimplementations will specifically illustrates the technical solution ofthe present disclosure in combination with FIGS. 3-7.

According to an implementation of the present disclosure, two systems ofthe dual-system terminal can be defined as a safe system and an unsafesystem.

Wherein, the terminal can simultaneously run the two systems. Thedivision of the system partitions is illustrated by FIG. 3. After theterminal is powered on, the bootloader simultaneously loads theboot-unsafe partition and the boot-safe partition, and starts initprocesses to respectively parse scripts of the init-unsafe andinit-safe, so as to create file systems, start system processes, and soon. The system-unsafe partition and the system-safe partition can beloaded to finish the starting process of the dual-system terminal. TheData-unsafe partition and Data-safe partition are the data partitionsfor storing two systems, the recovery partition is the system backupfile partition used for recovering a system.

When updating a system, the data of the aboot partition (the partitionfor storing the bootloader), the boot partition, and the systempartition are updated. The updating is realized by installing adifference packet recording difference between an old version and a newversion. Therefore, during updating a system, creating the differencepacket is very important. In an actual updating process, a correspondingdifference packet (that is, an updating file packet) can be createdaccording to needs.

According to an implementation of the present disclosure, during aprocess of creating a difference packet, when it is detected that thedata of the partition of the bootloader has changed, an identifier fileupdate-both is created in the difference packet to indicate that the twosystems need to be updated. When it is detected that the data of theboot-unsafe partition and/or system-unsafe partition has changed, anidentifier file update-unsafe is created in the difference packet toindicate that the normal system needs to be updated. When it is detectedthat the data of the boot-safe partition and/or system-safe partitionhas changed, an identifier file update-safe is created in the differencepacket to indicate that the safe system needs to be updated. That is, inroot directory of the created difference packet (updating packet) theidentifier file update-both, update-unsafe, or update-safe exists.Wherein, whether the data of a certain partition has changed can bedetermined by detecting whether a .p patch file exists in the certainpartition. When the .p patch file exists in the certain partition, it isdetermined that the data of the partition has changed, otherwise, it isdetermined that the data of the partition is unchanged.

Wherein, a system updating process of a dual-system terminal provided bythe present disclosure is illustrated by FIG. 4.

As illustrated by FIG. 4, a system updating method of a dual-systemterminal in accordance with an implementation of the present disclosureincludes following.

Step 402, an updating packet is parsed.

Step 404, the parsed updating packet is processed to determine anidentifier file of the updating packet.

Step 406, whether the parsed updating packet includes update-both isdetermined. If yes, step 408 is executed, otherwise, step 410 isexecuted.

Step 408, when it is determined that the parsed updating packet includesupdate-both, a normal system and a safe system are booted to be updatedsimultaneously.

Step 410, when it is determined that the parsed updating packet does notinclude update-both, whether the parsed updating packet includesupdate-unsafe is determined. If yes, step 412 is executed, otherwise,step 416 is executed.

Step 412, when it is determined that the parsed updating packet includesupdate-unsafe, whether the parsed updating packet includes update-safeis determined. If yes, step 408 is executed, otherwise, step 414 isexecuted.

Step 414, when it is determined that the parsed updating packet includesupdate-unsafe but does not include update-safe, the normal system isbooted to be updated.

Step 416, when it is determined that the parsed updating packet includesupdate-unsafe, whether the parsed updating packet includes update-safeis determined. If yes, step 418 is executed, otherwise, step 420 isexecuted.

Step 418, when it is determined that the parsed updating packet does notinclude update-unsafe but includes update-safe, the safe system isbooted to be updated.

Step 420, when it is determined that the parsed updating packet does notinclude update-both, update-unsafe, and update-safe, system updating isnot booted.

Wherein, a method for updating the normal system is illustrated by FIG.5.

As illustrated by FIG. 5, the updating method of the normal system inaccordance with an implementation of the present disclosure includesfollowing.

Step 502, files of the system-unsafe partition are verified.

Step 504, data of the boot-unsafe partition is verified.

Step 506, the files of the system-unsafe partition are written into acorresponding patch file.

Step 508, the data of the boot-unsafe partition is written into acorresponding patch file.

Wherein, a method for updating the normal system is illustrated by FIG.6.

As illustrated by FIG. 6, the updating method of the safe system inaccordance with an implementation of the present disclosure includesfollowing.

Step 602, files of the system-safe partition are verified.

Step 604, data of the boot-safe partition is verified.

Step 606, the files of the system-safe partition are written into acorresponding patch file.

Step 608, the data of the boot-unsafe partition is written into acorresponding patch file.

Wherein, a method for updating the normal system and the safe systemsimultaneously is illustrated by FIG. 7.

As illustrated by FIG. 7, the updating method for updating the normalsystem and the safe system simultaneously in accordance with animplementation of the present disclosure includes following.

Step 702, data of the aboot partition is verified.

Step 704, files of the system-unsafe partition and the system-safepartition are verified.

Step 706, data of the boot-unsafe partition and the boot-safe partitionis verified.

Step 708, the data of the aboot partition is written into acorresponding patch file.

Step 710, the files of the system-unsafe partition and the system-safepartition are written into corresponding patch files respectively.

Step 712, the data of the boot-unsafe partition and the boot-safepartition is written into corresponding patch files respectively.

FIG. 8 is a diagrammatic view of a multi-system terminal in accordancewith an implementation of the present disclosure. The terminal caninclude but not limited to a display unit 802, a memory 803, and aprocessor 804. The display unit 802 and the memory 803 are electricallycoupled to the processor 804.

The display unit 802 is configured to display visual information, suchas text, image, for example. The display unit 802 may be a lightemitting diode (LED) display screen or an organic light emitting diode(OLED) display screen.

The memory 803 is configured to store a plurality of computer-readableprogram codes 8031. The memory 803 can be a read only memory (ROM), arandom access memory (RAM), a U-disk, a removable hard disk, etc.

The processor 804 can include multiple cores for multi-thread orparallel processing. In this implementation, the processor 804 isconfigured to execute the plurality of computer-readable program codes8031 to perform following operations: during a process of creating asystem updating file of the multi-system terminal, detecting whetherdata of a plurality of file partitions specified in the system updatingfile has changed; upon detecting that the data of at least one filepartition of the plurality of file partitions has changed, establishingan identification file for updating a system corresponding to the atleast one file partition in the system updating file; and upon receivingan instruction for updating a system of the multi-system terminal,updating a corresponding system of the multi-system terminal accordingto the identification file of the system updating file.

In the implementation, the plurality of file partitions includes apartition of a boot program for booting the loading of a kernel of themulti-system terminal. Detecting whether the data of the plurality offile partitions specified in the system updating file has changed, andestablishing the identifier file includes: detecting whether the data ofthe partition of the boot program for booting the loading of the kernelof the multi-system terminal has changed; and establishing theidentifier file for updating all systems of the multi-system terminalupon detecting that the data of the partition of the boot program forbooting the loading of the kernel of the multi-system terminal haschanged.

In the implementation, the plurality of file partitions further includepartitions of boot programs each for booting the starting of one of thesystems of the multi-system terminal, and system partitions eachcorresponding to one of the systems; detecting whether the data of theplurality of file partitions specified in the system updating file haschanged, and establishing the identifier file comprises: detectingwhether the data of the file partitions of the boot programs each forbooting the starting of one of the systems of the multi-system terminalhas changed, and detecting whether the data of the system partitionseach corresponding to one of the systems has changed; and upon detectingthat the data of the partition of the boot program for booting theloading of the kernel of the multi-system terminal is unchanged, anddetecting that the data of the partition of the boot program for bootingthe starting of one of the systems of the multi-system terminal haschanged, and/or upon detecting that the data of the system partitioncorresponding to the one of the systems has changed, establishing anidentifier file for updating the one of the systems.

In the implementation, upon receiving the instruction for updating asystem of the multi-system terminal, the plurality of computer-readableprogram codes 8031 are further executed by the processor 804 to parsethe system updating file to obtain the identifier file of the systemupdating file.

In the implementation, whether the data of each of the plurality of filepartitions has changed is detected by detecting whether each of theplurality of file partitions comprises a file having a specified suffix.

In the implementation, updating one of the systems of the multi-systemterminal includes: verifying in the system updating file files of thesystem partition of the one of the systems, and verifying in the systemupdating file data of the partition of the boot program for booting thestarting of the one of the systems; and after the verification, writingthe files of the system partition of the one of the systems in thesystem updating file and the data of the partition of the boot programfor booting the starting of the one of the systems in the systemupdating file into corresponding file partitions of the multi-systemterminal respectively.

In the implementation, the plurality of computer-readable program codes8031 are further executed by the processor 804 to execute followingoperations: upon receiving an instruction for starting all of thesystems of the multi-system terminal, loading the partitions of the bootprograms each for booting the starting of one of the systems of themulti-system terminal via the boot program for booting the loading ofthe kernel of the multi-system terminal; and parsing scripts of initprocesses each corresponding to one of the systems via the initprocesses started by the kernel of the multi-system terminal, so as tocreate file systems each corresponding to one of the systems, and startsystem processes each corresponding to one of the systems, therebyrealizing loading of the system partitions each corresponding to one ofthe systems.

In the present disclosure, a machine-readable storage medium is furtherprovided. The storage medium includes a plurality of computer readableprogram codes. The plurality of computer readable program codes are runin a multi-system terminal to execute the system updating method for amulti-system terminal described above, which will not be specificallydescribed to avoid repetition.

In the technical solution of the present disclosure, during a process ofcreating the system updating file, whether the data of which filepartition has changed is detected, and then a system which needs to beupdated is determined according to the file partition the data of whichhas changed, and a corresponding identifier file is created. The systemof the terminal is then updated according to the identifier file of thesystem updating file. When updating the system, in the system updatingfile the patch file of the file partition corresponding to the systemwhich needs to be updated is written into a corresponding file partitionof the terminal.

The above specifically illustrates the technical solution of the presentdisclosure in combination with the accompanying drawings. As thepertinent art does not provide a feasible updating solution for amulti-system terminal, the present disclosure provides a new systemupdating solution for a multi-system terminal. By means of the systemupdating solution, any system of the multi-system terminal can beupdated easily, a high applicability can be obtained, the operation andcontrol is easy, thereby improving efficiency of system updating.

The foregoing descriptions are merely preferred implementations of thepresent disclosure, but are not intended to limit the presentdisclosure. For those skilled in the art, various changes and variationscan be made according to the present disclosure. Any modifications,equivalent replacements, and improvements within the spirit andprinciple of the technical solution should fall within the protectionscope of the present disclosure.

What is claimed is:
 1. A method for system updating for a multi-systemterminal, comprising: during a process of creating a system updatingfile of the multi-system terminal, detecting whether data of a filepartition of file partitions specified in the system updating file haschanged; upon detecting that the data of the file partition of the filepartitions has changed, establishing an identification file for updatinga system corresponding to the file partition in the system updatingfile; and upon receiving an instruction for updating a system of themulti-system terminal, updating a corresponding system of themulti-system terminal according to the identification file of the systemupdating file.
 2. The method of claim 1, wherein the file partitionscomprise a partition of a boot program for booting a loading of a kernelof the multi-system terminal; and the detecting whether data of a filepartition of file partitions specified in the system updating file haschanged and the establishing the identifier file comprise: detectingwhether the data of the partition of the boot program for booting theloading of the kernel of the multi-system terminal has changed; andestablishing the identifier file for updating all systems of themulti-system terminal upon detecting that the data of the partition ofthe boot program for booting the loading of the kernel of themulti-system terminal has changed.
 3. The method of claim 2, wherein thefile partitions further comprise partitions of boot programs, each forbooting a starting of one of the systems of the multi-system terminal,and system partitions, each corresponding to one of the systems; and thedetecting whether data of a file partition of file partitions specifiedin the system updating file has changed and the establishing theidentifier file comprise: detecting whether the data of the filepartitions of the boot programs, each for booting the starting of one ofthe systems of the multi-system terminal, has changed, and detectingwhether the data of the system partitions, each corresponding to one ofthe systems, has changed; and upon any of detecting that the data of thepartition of the boot program for booting the loading of the kernel ofthe multi-system terminal is unchanged and the data of the partition ofthe boot program for booting the starting of one of the systems of themulti-system terminal has changed, and detecting that the data of thesystem partition corresponding to the one of the systems has changed,establishing an identifier file for updating the one of the systems. 4.The method of claim 1, further comprising: upon receiving theinstruction for updating the system of the multi-system terminal,parsing the system updating file to obtain the identifier file of thesystem updating file.
 5. The method of claim 1, wherein the detectingwhether data of a file partition of file partitions specified in thesystem updating file has changed comprises: detecting whether each ofthe file partitions comprises a file having a specified suffix.
 6. Themethod of claim 1, wherein updating one of systems of the multi-systemterminal comprises: verifying, in the system updating file, files of thesystem partition of the one of the systems, and verifying, in the systemupdating file, data of the partition of a boot program for booting astarting of the one of the systems; and writing the files of the systempartition of the one of the systems in the system updating file and thedata of the partition of the boot program for booting the starting ofthe one of the systems in the system updating file into correspondingfile partitions of the multi-system terminal respectively.
 7. The methodof claim 1, wherein the method further comprises: upon receiving aninstruction for starting all systems of the multi-system terminal,loading partitions of boot programs, each for booting a starting of oneof the systems of the multi-system terminal, via a boot program forbooting the loading of a kernel of the multi-system terminal; andparsing scripts of init processes, each corresponding to one of thesystems, via the init processes started by the kernel of themulti-system terminal to create file systems, each corresponding to oneof the systems, and starting system processes, each corresponding to oneof the systems, to realize loading of the system partitions eachcorresponding to one of the systems.
 8. A multi-system terminalcomprising: a memory storing computer-readable program codes; and aprocessor configured to invoke the computer-readable program codes toexecute the following operations to: during a process of creating asystem updating file of the multi-system terminal, detect whether dataof a file partition of file partitions specified in the system updatingfile has changed; upon detecting that the data of the file partition ofthe file partitions has changed, establish an identification file forupdating a system corresponding to the file partition in the systemupdating file; and upon receiving an instruction for updating a systemof the multi-system terminal, update a corresponding system of themulti-system terminal according to the identification file of the systemupdating file.
 9. The multi-system terminal of claim 8, wherein the filepartitions comprise a partition of a boot program for booting a loadingof a kernel of the multi-system terminal; and the codes to detectwhether data of a file partition of file partitions specified in thesystem updating file has changed and to establish the identifier filecomprise codes to: detect whether the data of the partition of the bootprogram for booting the loading of the kernel of the multi-systemterminal has changed; and establish the identifier file for updating allsystems of the multi-system terminal upon detecting that the data of thepartition of the boot program for booting the loading of the kernel ofthe multi-system terminal has changed.
 10. The multi-system terminal ofclaim 9, wherein the file partitions further comprise partitions of bootprograms each for booting a starting of one of the systems of themulti-system terminal, and system partitions each corresponding to oneof the systems; and the codes to detect whether data of a file partitionof file partitions specified in the system updating file has changed andto establish the identifier file comprise codes to: detect whether thedata of the file partitions of the boot programs, each for booting thestarting of one of the systems of the multi-system terminal, haschanged, and detect whether the data of the system partitions, eachcorresponding to one of the systems, has changed; and upon any ofdetecting that the data of the partition of the boot program for bootingthe loading of the kernel of the multi-system terminal is unchanged andthe data of the partition of the boot program for booting the startingof one of the systems of the multi-system terminal has changed, anddetecting that the data of the system partition corresponding to the oneof the systems has changed, establish an identifier file for updatingthe one of the systems.
 11. The multi-system terminal of claim 8, thememory comprises further computer-readable program codes to: uponreceiving the instruction for updating the system of the multi-systemterminal, parse the system updating file to obtain the identifier fileof the system updating file.
 12. The multi-system terminal of claim 8,wherein the codes to detect whether data of a file partition of filepartitions specified in the system updating file has changed comprisescodes to: detect whether each of the file partitions comprises a filehaving a specified suffix.
 13. The multi-system terminal of claim 8,wherein the codes to update one of systems of the multi-system terminalcomprise codes to: verify, in the system updating file, files of thesystem partition of the one of the systems, and verify, in the systemupdating file, data of the partition of a boot program for booting astarting of the one of the systems; and write the files of the systempartition of the one of the systems in the system updating file and thedata of the partition of the boot program for booting the starting ofthe one of the systems in the system updating file into correspondingfile partitions of the multi-system terminal respectively.
 14. Themulti-system terminal of claim 8, wherein the computer-readable programcodes are further invoked by the processor to execute followingoperations to: upon receiving an instruction for starting all systems ofthe multi-system terminal, load partitions of boot programs, each forbooting a starting of one of the systems of the multi-system terminal,via a boot program for booting the loading of a kernel of themulti-system terminal; and parse scripts of init processes, eachcorresponding to one of the systems, via the init processes started bythe kernel of the multi-system terminal to create file systems, eachcorresponding to one of the systems, and start system processes, eachcorresponding to one of the systems, to realize loading of the systempartitions, each corresponding to one of the systems.
 15. Amachine-readable storage medium storing computer-readable program codes,the computer-readable program codes being invoked by a multi-systemterminal to execute the following operations: during a process ofcreating a system updating file of the multi-system terminal, detectingwhether data of a file partition of file partitions specified in thesystem updating file has changed; upon detecting that the data of thefile partition of the file partitions has changed, establishing anidentification file for updating a system corresponding to the filepartition in the system updating file; and upon receiving an instructionfor updating a system of the multi-system terminal, updating acorresponding system of the multi-system terminal according to theidentification file of the system updating file.
 16. Themachine-readable storage medium of claim 15, wherein the file partitionscomprise a partition of a boot program for booting a loading of a kernelof the multi-system terminal; and the detecting whether the data of thefile partitions specified in the system updating file has changed andthe establishing the identifier file comprise: detecting whether thedata of the partition of the boot program for booting the loading of thekernel of the multi-system terminal has changed; and establishing theidentifier file for updating all systems of the multi-system terminalupon detecting that the data of the partition of the boot program forbooting the loading of the kernel of the multi-system terminal haschanged.
 17. The machine-readable storage medium of claim 16, whereinthe file partitions further comprise partitions of boot programs eachfor booting a starting of one of the systems of the multi-systemterminal, and system partitions each corresponding to one of thesystems; and the detecting whether the data of the file partitionsspecified in the system updating file has changed and the establishingthe identifier file comprise: detecting whether the data of the filepartitions of the boot programs, each for booting the starting of one ofthe systems of the multi-system terminal, has changed, and detectingwhether the data of the system partitions, each corresponding to one ofthe systems, has changed; and upon any of detecting that the data of thepartition of the boot program for booting the loading of the kernel ofthe multi-system terminal is unchanged and the data of the partition ofthe boot program for booting the starting of one of the systems of themulti-system terminal has changed, and detecting that the data of thesystem partition corresponding to the one of the systems has changed,establishing an identifier file for updating the one of the systems. 18.The machine-readable storage medium of claim 15, wherein thecomputer-readable program codes are further invoked by the multi-systemterminal to execute the following operations: upon receiving theinstruction for updating a system of the multi-system terminal, parsingthe system updating file to obtain the identifier file of the systemupdating file.
 19. The machine-readable storage medium of claim 15,wherein updating one of systems of the multi-system terminal comprises:verifying, in the system updating file, files of the system partition ofthe one of the systems, and verifying, in the system updating file, dataof the partition of a boot program for booting a starting of the one ofthe systems; and writing the files of the system partition of the one ofthe systems in the system updating file and the data of the partition ofthe boot program for booting the starting of the one of the systems inthe system updating file into corresponding file partitions of themulti-system terminal respectively.
 20. The machine-readable storagemedium of claim 15, wherein the computer-readable program codes arefurther invoked by the multi-system terminal to execute followingoperations: upon receiving an instruction for starting all systems ofthe multi-system terminal, loading partitions of boot programs, each forbooting a starting of one of the systems of the multi-system terminal,via a boot program for booting the loading of a kernel of themulti-system terminal; and parsing scripts of init processes, eachcorresponding to one of the systems, via the init processes started bythe kernel of the multi-system terminal to create file systems, eachcorresponding to one of the systems, and starting system processes, eachcorresponding to one of the systems, to realize loading of the systempartitions each corresponding to one of the systems.